<!DOCTYPE HTML>
<html>
<head>
    {include file="common_header"}
    <title>订单详情</title>
</head>
<body>
<article class="page-container">
    <table class="table   table-hover " border="" cellspacing="" cellpadding="">
        <tr class="text-c">
            <th style="font-weight:bold;">订单编号</th>
            <td>{$orderinfo.o_number}</td>
            <!--<th style="font-weight:bold;">市场名称</th>
            <td>{$user.m_name}</td>-->
            <th style="font-weight:bold">用户姓名</th>
            <td>{$orderinfo.user_realname}</td>
            <th style="font-weight:bold">骑手姓名</th>
            <td>{$orderinfo.realname}</td>
        </tr>
        <tr class="text-c">
            <th style="font-weight:bold">订单数量</th>
            <td>{$orderinfo.o_quantity}</td>
            <th style="font-weight:bold">配送费</th>
            <td>{$orderinfo.distribution_fee}</td>
            <th style="font-weight:bold">优惠券</th>
            <td>{$orderinfo.name}</td>
        </tr>
        <tr class="text-c">
            <th style="font-weight:bold">商品总价</th>
            <td>{$orderinfo.o_totalprice}</td>
            <th style="font-weight:bold">订单总价</th>
            <td>{$orderinfo.o_totalmoney}</td>
            <th style="font-weight:bold">支付金额</th>
            <td>{$orderinfo.o_paymoney}</td>
        </tr>
        <tr class="text-c">
            <th style="font-weight:bold">订单类型</th>
            <td>{$types[$orderinfo['o_type']]}</td>
            <th style="font-weight:bold">订单状态</th>
            <td>{$status[$orderinfo['o_status']]}</td>
            <th style="font-weight:bold">超时状态</th>
            <td>{$o_isovertime[$orderinfo['o_isovertime']]}</td>
        </tr>
        <tr class="text-c">
            <th style="font-weight:bold">支付方式</th>
            <td>{$paytypes[$orderinfo['o_paytype']]}</td>
            <th style="font-weight:bold">支付时间</th>
            <td>{$orderinfo.o_paytime|date='Y-m-d H:i:s',###}</td>
            <th style="font-weight:bold">下单时间</th>
            <td >{$orderinfo.o_addtime|date='Y-m-d H:i:s',###}</td>
        </tr>
        <tr class="text-c">
            <th style="font-weight:bold">抢单截止时间</th>
            <td>{$orderinfo.o_waittime|date='Y-m-d H:i:s',###}</td>
            <th style="font-weight:bold">骑手接单时间</th>
            <td>{$orderinfo.o_begintime|date='Y-m-d H:i:s',###}</td>
            <th style="font-weight:bold">默认收货时间</th>
            <td >{$orderinfo.o_defaulttime|date='Y-m-d H:i:s',###}</td>
        </tr>
        <tr class="text-c">
            <th style="font-weight:bold">收货人</th>
            <td>{$orderinfo.ra_realname}</td>
            <th style="font-weight:bold">收货人电话</th>
            <td>{$orderinfo.ra_telphone}</td>
            <th style="font-weight:bold">收货地址</th>
            <td >{$orderinfo.ra_address}</td>
        </tr>
        <tr class="text-c">
            <th style="font-weight:bold">订单完成时间</th>
            <td>{$orderinfo.o_lasttime|date='Y-m-d H:i:s',###}</td>
            <th style="font-weight:bold">备注</th>
            <td colspan="3">{$orderinfo.o_remark}</td>
        </tr>
    </table>
</article>
<div style="margin-left: 30px;margin-top: 20px;">
    <div class="btn btn-primary radius" style="width: 100%;margin-bottom: 40px;">商家信息</div>
    {volist name="shoplist" id="shopinfo"}
        <div  style="margin-bottom: 30px;">
            <span style="margin-left: 25px; margin-top: 100px;">商家名称：{$shopinfo.shop_name}</span>
            <div style="margin-left: 25px;top: 50px;">商家评价：
                {if condition="$shopinfo['comment_status'] eq 2"}
                <div>星级：{$shopinfo.s_star}</div>
                <div>内容：{$shopinfo.s_content}</div>
                <div>时间：{$shopinfo.s_createtime|date='Y-m-d H:i:s',###} </div>
                {else/}
                未评论
                {/if}
            </div>
            <table class="table table-border table-bordered table-bg">
                <thead>
                <tr class="text-c">
                    <th width="80">商品名称</th>
                    <th width="80">商品数量</th>
                    <th width="80">商品价格</th>
                </tr>
                </thead>
                <tbody>
                {volist name="shopinfo['goods']" id="v"}
                <tr class="text-c">
                    <td>{$v.goods_name}</td>
                    <td>{$v.num}</td>
                    <td>{$v.price}</td>
                </tr>
                {/volist}
                </tbody>
            </table>
    </div>
    {/volist}
</div>
        <!--分配骑手   dist_rider-->
    {if condition="$orderinfo['o_status'] eq 2"}
        <div style="margin-left: 30px;margin-top: 30px; font-size: 20px;" >
            <div class="btn btn-primary radius" onclick="layer_show('骑手信息','{:url('dist_rider',['order_id'=>$orderinfo['id']])}','800','600')"  style="text-decoration:none;" >分配骑手</div>
        </div>
    {/if}
<!--_footer 作为公共模版分离出去-->
{include file="common_footer"}
</body>
</html>